{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "from MalardClient.MalardClient import MalardClient\n",
    "from MalardClient.DataSet import DataSet\n",
    "import os\n",
    "\n",
    "client = MalardClient()\n",
    "\n",
    "ds = DataSet(\"cryotempo\",\"oib\",\"antarctic\" )\n",
    "\n",
    "bb = client.boundingBox( ds )\n",
    "\n",
    "sh = client.shards( ds, bb )\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n",
      "File failed\n"
     ]
    }
   ],
   "source": [
    "for s in sh:\n",
    "    try:\n",
    "        os.remove(s.shardName)\n",
    "    except:\n",
    "        print(\"File failed\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 0 catalogue records\n",
      "After delete 0 catalogue records\n",
      "Found 2698 swath details records\n",
      "After delete 0 swath details records\n"
     ]
    }
   ],
   "source": [
    "\n",
    "import pymongo as p\n",
    "\n",
    "mongo = p.MongoClient(\"mongodb://localhost:27018\")\n",
    "\n",
    "\n",
    "db = mongo[ds.parentDataSet]\n",
    "\n",
    "res = db.catalogue.find({ \"$and\": [ {\"dsName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "print( \"Found {} catalogue records\".format(len(list(res) ) ) )\n",
    "\n",
    "res = db.catalogue.delete_many({ \"$and\": [ {\"dsName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "\n",
    "res = db.catalogue.find({ \"$and\": [ {\"dsName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "print( \"After delete {} catalogue records\".format(len(list(res) ) ) )\n",
    "\n",
    "res = db.swathDetails.find({ \"$and\": [ {\"datasetName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "print( \"Found {} swath details records\".format(len(list(res) ) ) )\n",
    "\n",
    "res = db.swathDetails.delete_many({ \"$and\": [ {\"datasetName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "\n",
    "res = db.swathDetails.find({ \"$and\": [ {\"datasetName\":ds.dataSet }, {\"region\":ds.region } ] }  )\n",
    "\n",
    "print( \"After delete {} swath details records\".format(len(list(res) ) ) )\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['_BaseObject__codec_options', '_BaseObject__read_concern', '_BaseObject__read_preference', '_BaseObject__write_concern', '_Collection__create', '_Collection__create_index', '_Collection__database', '_Collection__find_and_modify', '_Collection__full_name', '_Collection__name', '_Collection__write_response_codec_options', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__next__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_aggregate', '_aggregate_one_result', '_command', '_count', '_delete', '_delete_retryable', '_insert', '_insert_one', '_legacy_write', '_read_preference_for', '_socket_for_primary_reads', '_socket_for_reads', '_socket_for_writes', '_update', '_update_retryable', '_write_concern_for', '_write_concern_for_cmd', 'aggregate', 'aggregate_raw_batches', 'bulk_write', 'codec_options', 'count', 'count_documents', 'create_index', 'create_indexes', 'database', 'delete_many', 'delete_one', 'distinct', 'drop', 'drop_index', 'drop_indexes', 'ensure_index', 'estimated_document_count', 'find', 'find_and_modify', 'find_one', 'find_one_and_delete', 'find_one_and_replace', 'find_one_and_update', 'find_raw_batches', 'full_name', 'group', 'index_information', 'initialize_ordered_bulk_op', 'initialize_unordered_bulk_op', 'inline_map_reduce', 'insert', 'insert_many', 'insert_one', 'list_indexes', 'map_reduce', 'name', 'next', 'options', 'parallel_scan', 'read_concern', 'read_preference', 'reindex', 'remove', 'rename', 'replace_one', 'save', 'update', 'update_many', 'update_one', 'watch', 'with_options', 'write_concern']\n"
     ]
    }
   ],
   "source": [
    "print(dir(db.catalogue))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
